package com.iptv.grape.domain;

// 直播频道播放历史数据
public class ChannelRecords implements Comparable<ChannelRecords>{
    // 被播放的频道ID
    private String channelID;
    // 频道号
    private int channelNo;
    // 频道名称
    private String name;
    // 图标地址
    private String logo;
    // 播放地址
    private String playUrl;
    // 播放次数
    private int count = 1;

    public String getPlayUrl() {
        return playUrl;
    }

    public void setPlayUrl(String playUrl) {
        this.playUrl = playUrl;
    }

    public String getChannelID() {
        return channelID;
    }

    public void setChannelID(String channelID) {
        this.channelID = channelID;
    }

    public int getChannelNo() {
        return channelNo;
    }

    public void setChannelNo(int channelNo) {
        this.channelNo = channelNo;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getLogo() {
        return logo;
    }

    public void setLogo(String logo) {
        this.logo = logo;
    }

    public int getCount() {
        return count;
    }

    public void setCount(int count) {
        this.count = count;
    }

    // 增加次数
    public void addCount() {
        this.count++;
    }


    @Override
    public int compareTo(ChannelRecords channelRecords) {
        return this.count - channelRecords.count;
    }
}
